<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../js/vue.js"></script>
    <script src="../js/dayjs.min.js"></script>

    <title>Document</title>
    <style>
        [v-clock] {
            display: none;
        }
    </style>
</head>

<body>
    <div id="root">
        <!-- 
    v-pre:vue 跳过解析
 -->
        <div v-pre>hello</div>
        <div>{{name}}</div>
        <div v-text="name"></div>
        <div v-html="str"></div>
        <div v-clock>你好：{{name}}</div>
        <div v-once>初始n值：{{n}}</div>
        <div>n值：{{n}}</div>
        <button @click="n++">n+1</button>
    </div>
</body>
<script>
    Vue.config.productionTip = false
    //全局过滤器
    Vue.filter('mySlice', function (value) {
        return value.slice(0, 4)
    })
    const vm = new Vue({
        el: '#root',
        data: {
            name: '北京',
            str: '<h3>你好</h3>',
            n: 1
        }

    })
</script>

</html>